.class public Lrexsee/core/widget/TabBar;
.super Lrexsee/core/widget/Div;
.source "TabBar.java"


# instance fields
.field public final mContainer:Landroid/widget/LinearLayout;

.field private final mScrollerX:Lrexsee/core/widget/HScrollView;

.field private final mScrollerY:Landroid/widget/ScrollView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lrexsee/core/menu/PopMenu;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "popMenu"    # Lrexsee/core/menu/PopMenu;

    .prologue
    .line 18
    const-string v0, ""

    invoke-direct {p0, p1, p2, v0}, Lrexsee/core/widget/TabBar;-><init>(Landroid/content/Context;Lrexsee/core/menu/PopMenu;Ljava/lang/String;)V

    .line 19
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lrexsee/core/menu/PopMenu;Ljava/lang/String;)V
    .locals 6
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "popMenu"    # Lrexsee/core/menu/PopMenu;
    .param p3, "style"    # Ljava/lang/String;

    .prologue
    const/4 v5, 0x1

    const-string v3, "visible"

    .line 22
    invoke-direct {p0, p1}, Lrexsee/core/widget/Div;-><init>(Landroid/content/Context;)V

    .line 24
    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->id:Ljava/lang/String;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabBar;->setDivId(Ljava/lang/String;)V

    .line 25
    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v3}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v3

    invoke-virtual {v3, p3}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v3

    iput-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    .line 27
    new-instance v3, Landroid/widget/LinearLayout;

    invoke-direct {v3, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    .line 28
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    iget-object v4, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->getGravity()I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 29
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->orientation:Ljava/lang/String;

    const-string v4, "x"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    iget-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->orientation:Ljava/lang/String;

    const-string v4, "horizontal"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 30
    :cond_0
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 34
    :goto_0
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->items:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-lt v1, v3, :cond_2

    .line 39
    new-instance v3, Lrexsee/core/widget/TabBar$1;

    invoke-direct {v3, p0, p1}, Lrexsee/core/widget/TabBar$1;-><init>(Lrexsee/core/widget/TabBar;Landroid/content/Context;)V

    iput-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    .line 49
    new-instance v3, Lrexsee/core/widget/TabBar$2;

    invoke-direct {v3, p0, p1}, Lrexsee/core/widget/TabBar$2;-><init>(Lrexsee/core/widget/TabBar;Landroid/content/Context;)V

    iput-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    .line 62
    :try_start_0
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->overflow_x:Ljava/lang/String;

    const-string v4, "visible"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    iget-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->overflow_y:Ljava/lang/String;

    const-string v4, "visible"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    .line 63
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    iget-object v4, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v4}, Lrexsee/core/widget/HScrollView;->addView(Landroid/view/View;)V

    .line 64
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    iget-object v4, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    invoke-virtual {v3, v4}, Landroid/widget/ScrollView;->addView(Landroid/view/View;)V

    .line 65
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabBar;->addDivChild(Landroid/view/View;)V

    .line 76
    :goto_2
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->setBarStyle()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 81
    :goto_3
    return-void

    .line 32
    .end local v1    # "i":I
    :cond_1
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v5}, Landroid/widget/LinearLayout;->setOrientation(I)V

    goto :goto_0

    .line 35
    .restart local v1    # "i":I
    :cond_2
    new-instance v2, Lrexsee/core/widget/Tab;

    iget-object v3, p2, Lrexsee/core/menu/PopMenu;->items:Ljava/util/ArrayList;

    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lrexsee/core/menu/PopMenuItem;

    invoke-direct {v2, p1, v3}, Lrexsee/core/widget/Tab;-><init>(Landroid/content/Context;Lrexsee/core/menu/PopMenuItem;)V

    .line 36
    .local v2, "tab":Lrexsee/core/widget/Tab;
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 34
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 66
    .end local v2    # "tab":Lrexsee/core/widget/Tab;
    :cond_3
    :try_start_1
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->overflow_x:Ljava/lang/String;

    const-string v4, "visible"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_4

    .line 67
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    iget-object v4, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v4}, Lrexsee/core/widget/HScrollView;->addView(Landroid/view/View;)V

    .line 68
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabBar;->addDivChild(Landroid/view/View;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    .line 78
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 79
    .local v0, "e":Ljava/lang/Exception;
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "TabBar:"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {p1, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v3

    invoke-virtual {v3}, Landroid/widget/Toast;->show()V

    goto :goto_3

    .line 69
    .end local v0    # "e":Ljava/lang/Exception;
    :cond_4
    :try_start_2
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v3, v3, Lrexsee/core/style/StyleSheet;->overflow_y:Ljava/lang/String;

    const-string v4, "visible"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_5

    .line 70
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    iget-object v4, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v3, v4}, Landroid/widget/ScrollView;->addView(Landroid/view/View;)V

    .line 71
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabBar;->addDivChild(Landroid/view/View;)V

    goto :goto_2

    .line 73
    :cond_5
    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabBar;->addDivChild(Landroid/view/View;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_2
.end method


# virtual methods
.method public getTab(I)Lrexsee/core/widget/Tab;
    .locals 1
    .param p1, "index"    # I

    .prologue
    .line 118
    iget-object v0, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    if-lt p1, v0, :cond_0

    const/4 v0, 0x0

    .end local p0    # "this":Lrexsee/core/widget/TabBar;
    :goto_0
    return-object v0

    .restart local p0    # "this":Lrexsee/core/widget/TabBar;
    :cond_0
    iget-object v0, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v0, p1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object p0

    .end local p0    # "this":Lrexsee/core/widget/TabBar;
    check-cast p0, Lrexsee/core/widget/Tab;

    move-object v0, p0

    goto :goto_0
.end method

.method public getTab(Ljava/lang/String;)Lrexsee/core/widget/Tab;
    .locals 3
    .param p1, "id"    # Ljava/lang/String;

    .prologue
    .line 132
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v2

    if-lt v0, v2, :cond_0

    .line 136
    const/4 v2, 0x0

    :goto_1
    return-object v2

    .line 133
    :cond_0
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lrexsee/core/widget/Tab;

    .line 134
    .local v1, "tab":Lrexsee/core/widget/Tab;
    invoke-virtual {v1}, Lrexsee/core/widget/Tab;->getDivId()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    move-object v2, v1

    goto :goto_1

    .line 132
    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method public final scrollToChild(Landroid/view/View;)V
    .locals 7
    .param p1, "child"    # Landroid/view/View;

    .prologue
    const/4 v5, 0x0

    const-string v6, "visible"

    .line 163
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->overflow_x:Ljava/lang/String;

    const-string v3, "visible"

    invoke-virtual {v2, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 164
    invoke-virtual {p1}, Landroid/view/View;->getLeft()I

    move-result v2

    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    invoke-virtual {v3}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v3

    sub-int v0, v2, v3

    .line 165
    .local v0, "x":I
    if-gez v0, :cond_0

    .line 166
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    invoke-virtual {v2, v0, v5}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    .line 168
    :cond_0
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->getWidth()I

    move-result v2

    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v3

    sub-int/2addr v2, v3

    if-le v0, v2, :cond_1

    .line 169
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->getWidth()I

    move-result v3

    invoke-virtual {p1}, Landroid/view/View;->getWidth()I

    move-result v4

    sub-int/2addr v3, v4

    sub-int v3, v0, v3

    invoke-virtual {v2, v3, v5}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    .line 172
    .end local v0    # "x":I
    :cond_1
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->overflow_y:Ljava/lang/String;

    const-string v3, "visible"

    invoke-virtual {v2, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_3

    .line 173
    invoke-virtual {p1}, Landroid/view/View;->getTop()I

    move-result v2

    iget-object v3, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    invoke-virtual {v3}, Landroid/widget/ScrollView;->getScrollY()I

    move-result v3

    sub-int v1, v2, v3

    .line 174
    .local v1, "y":I
    if-gez v1, :cond_2

    .line 175
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    invoke-virtual {v2, v5, v1}, Landroid/widget/ScrollView;->scrollBy(II)V

    .line 177
    :cond_2
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->getHeight()I

    move-result v2

    invoke-virtual {p1}, Landroid/view/View;->getHeight()I

    move-result v3

    sub-int/2addr v2, v3

    if-le v1, v2, :cond_3

    .line 178
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->getHeight()I

    move-result v3

    invoke-virtual {p1}, Landroid/view/View;->getHeight()I

    move-result v4

    sub-int/2addr v3, v4

    sub-int v3, v1, v3

    invoke-virtual {v2, v5, v3}, Landroid/widget/ScrollView;->scrollBy(II)V

    .line 181
    .end local v1    # "y":I
    :cond_3
    return-void
.end method

.method public selectTab(I)Z
    .locals 2
    .param p1, "index"    # I

    .prologue
    const/4 v1, 0x1

    .line 121
    invoke-virtual {p0, p1}, Lrexsee/core/widget/TabBar;->getTab(I)Lrexsee/core/widget/Tab;

    move-result-object v0

    .line 122
    .local v0, "tab":Lrexsee/core/widget/Tab;
    if-eqz v0, :cond_0

    .line 123
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->unselectTabs()V

    .line 124
    invoke-virtual {v0, v1}, Lrexsee/core/widget/Tab;->setSelected(Z)V

    .line 125
    invoke-virtual {p0, v0}, Lrexsee/core/widget/TabBar;->scrollToChild(Landroid/view/View;)V

    .line 128
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public selectTab(Ljava/lang/String;)Z
    .locals 2
    .param p1, "id"    # Ljava/lang/String;

    .prologue
    .line 139
    const/4 v0, 0x1

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    aput-object p1, v0, v1

    invoke-virtual {p0, v0}, Lrexsee/core/widget/TabBar;->selectTabs([Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public selectTabs([Ljava/lang/String;)Z
    .locals 5
    .param p1, "ids"    # [Ljava/lang/String;

    .prologue
    .line 142
    if-nez p1, :cond_0

    const/4 v4, 0x0

    .line 154
    :goto_0
    return v4

    .line 143
    :cond_0
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->unselectTabs()V

    .line 144
    const/4 v2, 0x0

    .line 145
    .local v2, "rtn":Z
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_1
    array-length v4, p1

    if-lt v0, v4, :cond_1

    move v4, v2

    .line 154
    goto :goto_0

    .line 146
    :cond_1
    aget-object v1, p1, v0

    .line 147
    .local v1, "id":Ljava/lang/String;
    invoke-virtual {p0, v1}, Lrexsee/core/widget/TabBar;->getTab(Ljava/lang/String;)Lrexsee/core/widget/Tab;

    move-result-object v3

    .line 148
    .local v3, "tab":Lrexsee/core/widget/Tab;
    if-eqz v3, :cond_2

    .line 149
    const/4 v4, 0x1

    invoke-virtual {v3, v4}, Lrexsee/core/widget/Tab;->setSelected(Z)V

    .line 150
    invoke-virtual {p0, v3}, Lrexsee/core/widget/TabBar;->scrollToChild(Landroid/view/View;)V

    .line 151
    const/4 v2, 0x1

    .line 145
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method public setBarStyle()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x1

    const-string v1, "hidden"

    const-string v1, ""

    const-string v1, "visible"

    .line 89
    :try_start_0
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->overflow_x:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 90
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lrexsee/core/widget/HScrollView;->setHorizontalFadingEdgeEnabled(Z)V

    .line 91
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->fading_edge_x_length:Ljava/lang/String;

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    const-string v3, "px"

    const-string v4, ""

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Lrexsee/core/widget/HScrollView;->setFadingEdgeLength(I)V

    .line 92
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->scrollbar_x:Ljava/lang/String;

    const-string v2, "hidden"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 93
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lrexsee/core/widget/HScrollView;->setHorizontalScrollBarEnabled(Z)V

    .line 100
    :cond_0
    :goto_0
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->overflow_y:Ljava/lang/String;

    const-string v2, "visible"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 101
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/widget/ScrollView;->setVerticalFadingEdgeEnabled(Z)V

    .line 102
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->fading_edge_y_length:Ljava/lang/String;

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    const-string v3, "px"

    const-string v4, ""

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/ScrollView;->setFadingEdgeLength(I)V

    .line 103
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->scrollbar_y:Ljava/lang/String;

    const-string v2, "hidden"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 104
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 114
    :cond_1
    :goto_1
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->setDivStyle()V

    .line 115
    return-void

    .line 95
    :cond_2
    :try_start_1
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lrexsee/core/widget/HScrollView;->setHorizontalScrollBarEnabled(Z)V

    .line 96
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getScrollbarXStyle()I

    move-result v2

    invoke-virtual {v1, v2}, Lrexsee/core/widget/HScrollView;->setScrollBarStyle(I)V

    .line 97
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerX:Lrexsee/core/widget/HScrollView;

    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->scrollbar_x:Ljava/lang/String;

    const-string v3, "visible"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_3

    move v2, v6

    :goto_2
    invoke-virtual {v1, v2}, Lrexsee/core/widget/HScrollView;->setScrollbarFadingEnabled(Z)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 111
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 112
    .local v0, "e":Ljava/lang/Exception;
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mContext:Landroid/content/Context;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "TabBar:"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_1

    .end local v0    # "e":Ljava/lang/Exception;
    :cond_3
    move v2, v5

    .line 97
    goto :goto_2

    .line 106
    :cond_4
    :try_start_2
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V

    .line 107
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v2}, Lrexsee/core/style/StyleSheet;->getScrollbarYStyle()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/ScrollView;->setScrollBarStyle(I)V

    .line 108
    iget-object v1, p0, Lrexsee/core/widget/TabBar;->mScrollerY:Landroid/widget/ScrollView;

    iget-object v2, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v2, v2, Lrexsee/core/style/StyleSheet;->scrollbar_y:Ljava/lang/String;

    const-string v3, "visible"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_5

    move v2, v6

    :goto_3
    invoke-virtual {v1, v2}, Landroid/widget/ScrollView;->setScrollbarFadingEnabled(Z)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_1

    :cond_5
    move v2, v5

    goto :goto_3
.end method

.method public setBarStyle(Ljava/lang/String;)V
    .locals 1
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 84
    iget-object v0, p0, Lrexsee/core/widget/TabBar;->styleSheet:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 85
    invoke-virtual {p0}, Lrexsee/core/widget/TabBar;->setBarStyle()V

    .line 86
    return-void
.end method

.method public unselectTabs()V
    .locals 3

    .prologue
    .line 157
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v2

    if-lt v0, v2, :cond_0

    .line 161
    return-void

    .line 158
    :cond_0
    iget-object v2, p0, Lrexsee/core/widget/TabBar;->mContainer:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lrexsee/core/widget/Tab;

    .line 159
    .local v1, "tab":Lrexsee/core/widget/Tab;
    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lrexsee/core/widget/Tab;->setSelected(Z)V

    .line 157
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method
